package com.wzdigit.wms.basic.mapper.core.inventory.manager;

import com.wzdigit.framework.orm.mybatis.MyBatisRepository;
import com.wzdigit.wms.basic.client.request.inv.SearchHoldDtlListForWaitFreezeByAsnRequest.SearchHoldDtlListForWaitFreezeItemByAsnRequest;
import com.wzdigit.wms.basic.client.request.inv.SearchHoldDtlListForWaitFreezeByLotnoRequest.SearchHoldDtlListForWaitFreezeItemByLotnoRequest;
import com.wzdigit.wms.basic.client.request.inv.SearchHoldDtlListForWaitFreezeByOqcRequest.SearchHoldDtlListForWaitFreezeItemByOqcRequest;
import com.wzdigit.wms.basic.client.request.inv.SearchHoldDtlListForWaitFreezeBySkuRequest.SearchHoldDtlListForWaitFreezeItemBySkuRequest;
import com.wzdigit.wms.basic.client.request.inv.SearchInvHoldByAsnRequest;
import com.wzdigit.wms.basic.client.request.inv.SearchInvHoldByOqcRequest;
import com.wzdigit.wms.basic.client.request.inv.SearchInvHoldBySkuRequest;
import com.wzdigit.wms.basic.client.request.inv.SubmitHoldFreezeRequest.SubmitHoldFreezeItemRequest;
import com.wzdigit.wms.basic.client.response.inv.HoldDtlGoodsResponse;
import com.wzdigit.wms.basic.client.response.inv.HoldDtlListForWaitFreezeResponse;
import com.wzdigit.wms.basic.client.response.inv.HoldErrorGoodsResponse;
import com.wzdigit.wms.basic.client.response.inv.InvHoldByAsnResponse;
import com.wzdigit.wms.basic.client.response.inv.InvHoldByLontnoResponse;
import com.wzdigit.wms.basic.client.response.inv.InvHoldByOqcResponse;
import com.wzdigit.wms.basic.client.response.inv.InvHoldBySkuResponse;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * 冻结/解冻【原材料】
 * @author Administrator
 *
 */
@MyBatisRepository
public interface GoodsHoldMapper {
	
	// 送货单冻结物料选择
    List<InvHoldByAsnResponse> selectInvHoldByAsn(@Param("dto")SearchInvHoldByAsnRequest dto,
    		@Param("beginRcvDate")Date beginRcvDate, @Param("endRcvDate")Date endRcvDate);

    // 检验单冻结物料选择
    List<InvHoldByOqcResponse> selectInvHoldByOqc(@Param("dto")SearchInvHoldByOqcRequest dto,
    		@Param("beginInspEndDate")Date beginInspEndDate, @Param("endInspEndDate")Date endInspEndDate);

    // 料号冻结物料选择
    List<InvHoldBySkuResponse> selectInvHoldBySku(SearchInvHoldBySkuRequest dto);

    // 批次号冻结物料选择
    List<InvHoldByLontnoResponse> selectInvHoldByLontno(String lotno);
    
    
    // 送货单冻结物料选择=》统计待冻结明细
    List<HoldDtlListForWaitFreezeResponse> selectHoldDtlListForWaitFreezeByAsn(
    		@Param("list")List<SearchHoldDtlListForWaitFreezeItemByAsnRequest> list);

    // 检验单冻结物料选择=》统计待冻结明细
    List<HoldDtlListForWaitFreezeResponse> selectHoldDtlListForWaitFreezeByOqc(
    		@Param("list")List<SearchHoldDtlListForWaitFreezeItemByOqcRequest> list);

    // 料号冻结物料选择=》统计待冻结明细
    List<HoldDtlListForWaitFreezeResponse> selectHoldDtlListForWaitFreezeBySku(
    		@Param("list")List<SearchHoldDtlListForWaitFreezeItemBySkuRequest> list);

    // 批次号冻结物料选择=》统计待冻结明细
    List<HoldDtlListForWaitFreezeResponse> selectHoldDtlListForWaitFreezeByLontno(
    		@Param("list")List<SearchHoldDtlListForWaitFreezeItemByLotnoRequest> list);
    
    
    
    // 送货单冻结物料选择=》统计序号明细
    List<HoldDtlGoodsResponse> selectHoldDtlGoodsListForWaitFreezeByAsn(
    		@Param("list")List<SubmitHoldFreezeItemRequest> list, @Param("goodsSn")String goodsSn);

    // 检验单冻结物料选择=》统计序号明细
    List<HoldDtlGoodsResponse> selectHoldDtlGoodsListForWaitFreezeByOqc(
    		@Param("list")List<SubmitHoldFreezeItemRequest> list, @Param("goodsSn")String goodsSn);

    // 料号/批次号 冻结物料选择=》统计序号明细
    List<HoldDtlGoodsResponse> selectHoldDtlGoodsListForWaitFreezeBySkuOrLotno(
    		@Param("list")List<SubmitHoldFreezeItemRequest> list, @Param("goodsSn")String goodsSn);
    
    /**
     * 冻结失败的SN信息
     * 
     * @param goodsSnList
     * @return
     */
    List<HoldErrorGoodsResponse> selectHoldErrorGoodsList(@Param("goodsSnList")List<String> goodsSnList);
}
